module.exports = function (year, month) {
  let month2 = month - 1
  let tmpDay = 1
  let dayArr = []

  while (true) {
    let tmp = new Date(year, month2, tmpDay)
    if (tmp.getMonth() !== month2) {
      break
    }
    dayArr.push(tmp)
    tmpDay++
  }

  return dayArr
}
